package com.vehicle.mapper;

import com.vehicle.pojo.Role;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoleMapper {
    //分布查询role
    public List<Role> selectRolesWithStep();

    //根据roleid查询role
    public Role selectRoleByRid(@Param("rid") Integer rid);

    //分布查询role
    public List<Role> selectRolesPWithStep();

    //分页查询role角色
    public List<Role> selectRoleByPage(Role role);

    //查询所有role
    public List<Role> selectRoles();

    //根据uid查询role
    public List<Role> selectRolesByUid(Integer uid);

    //根据rid删除permission_role中间表记录
    public void deletePRByRid(Integer rid);

    //增加permission_role中间表记录
    public void insertPR(@Param("rid") Integer rid,@Param("pid") Integer pid);

    //增加role
    public void insertRole(Role role);

}
